import {
  createRouter,
  createWebHistory,
  type RouteRecordRaw,
} from "vue-router";
import Home from "../views/Home.vue";
import Data from "../views/Data.vue";
import Analysis from "../views/Analysis.vue";
import Settings from "../views/Settings.vue";

// 定义路由规则
const routes: RouteRecordRaw[] = [
  {
    path: "/",
    name: "Home",
    component: Home,
  },
  {
    path: "/data",
    name: "Data",
    component: Data,
  },
  {
    path: "/analysis",
    name: "Analysis",
    component: Analysis,
  },
  {
    path: "/settings",
    name: "Settings",
    component: Settings,
  },
];

// 创建路由实例
const router = createRouter({
  history: createWebHistory(),
  routes,
});

export default router;
